﻿using System;
using System.Runtime.InteropServices;

namespace Valve.VR
{
	// Token: 0x0200078C RID: 1932
	public class CVRTrackedCamera
	{
		// Token: 0x06002E1B RID: 11803 RVA: 0x000F1CA8 File Offset: 0x000EFEA8
		internal CVRTrackedCamera(IntPtr pInterface)
		{
			this.FnTable = (IVRTrackedCamera)Marshal.PtrToStructure(pInterface, typeof(IVRTrackedCamera));
		}

		// Token: 0x06002E1C RID: 11804 RVA: 0x000F1CCC File Offset: 0x000EFECC
		public string GetCameraErrorNameFromEnum(EVRTrackedCameraError eCameraError)
		{
			IntPtr ptr = this.FnTable.GetCameraErrorNameFromEnum(eCameraError);
			return Marshal.PtrToStringAnsi(ptr);
		}

		// Token: 0x06002E1D RID: 11805 RVA: 0x000F1CF4 File Offset: 0x000EFEF4
		public EVRTrackedCameraError HasCamera(uint nDeviceIndex, ref bool pHasCamera)
		{
			pHasCamera = false;
			return this.FnTable.HasCamera(nDeviceIndex, ref pHasCamera);
		}

		// Token: 0x06002E1E RID: 11806 RVA: 0x000F1D18 File Offset: 0x000EFF18
		public EVRTrackedCameraError GetCameraFrameSize(uint nDeviceIndex, EVRTrackedCameraFrameType eFrameType, ref uint pnWidth, ref uint pnHeight, ref uint pnFrameBufferSize)
		{
			pnWidth = 0U;
			pnHeight = 0U;
			pnFrameBufferSize = 0U;
			return this.FnTable.GetCameraFrameSize(nDeviceIndex, eFrameType, ref pnWidth, ref pnHeight, ref pnFrameBufferSize);
		}

		// Token: 0x06002E1F RID: 11807 RVA: 0x000F1D4C File Offset: 0x000EFF4C
		public EVRTrackedCameraError GetCameraIntrinsics(uint nDeviceIndex, EVRTrackedCameraFrameType eFrameType, ref HmdVector2_t pFocalLength, ref HmdVector2_t pCenter)
		{
			return this.FnTable.GetCameraIntrinsics(nDeviceIndex, eFrameType, ref pFocalLength, ref pCenter);
		}

		// Token: 0x06002E20 RID: 11808 RVA: 0x000F1D70 File Offset: 0x000EFF70
		public EVRTrackedCameraError GetCameraProjection(uint nDeviceIndex, EVRTrackedCameraFrameType eFrameType, float flZNear, float flZFar, ref HmdMatrix44_t pProjection)
		{
			return this.FnTable.GetCameraProjection(nDeviceIndex, eFrameType, flZNear, flZFar, ref pProjection);
		}

		// Token: 0x06002E21 RID: 11809 RVA: 0x000F1D98 File Offset: 0x000EFF98
		public EVRTrackedCameraError AcquireVideoStreamingService(uint nDeviceIndex, ref ulong pHandle)
		{
			pHandle = 0UL;
			return this.FnTable.AcquireVideoStreamingService(nDeviceIndex, ref pHandle);
		}

		// Token: 0x06002E22 RID: 11810 RVA: 0x000F1DC0 File Offset: 0x000EFFC0
		public EVRTrackedCameraError ReleaseVideoStreamingService(ulong hTrackedCamera)
		{
			return this.FnTable.ReleaseVideoStreamingService(hTrackedCamera);
		}

		// Token: 0x06002E23 RID: 11811 RVA: 0x000F1DE0 File Offset: 0x000EFFE0
		public EVRTrackedCameraError GetVideoStreamFrameBuffer(ulong hTrackedCamera, EVRTrackedCameraFrameType eFrameType, IntPtr pFrameBuffer, uint nFrameBufferSize, ref CameraVideoStreamFrameHeader_t pFrameHeader, uint nFrameHeaderSize)
		{
			return this.FnTable.GetVideoStreamFrameBuffer(hTrackedCamera, eFrameType, pFrameBuffer, nFrameBufferSize, ref pFrameHeader, nFrameHeaderSize);
		}

		// Token: 0x06002E24 RID: 11812 RVA: 0x000F1E08 File Offset: 0x000F0008
		public EVRTrackedCameraError GetVideoStreamTextureSize(uint nDeviceIndex, EVRTrackedCameraFrameType eFrameType, ref VRTextureBounds_t pTextureBounds, ref uint pnWidth, ref uint pnHeight)
		{
			pnWidth = 0U;
			pnHeight = 0U;
			return this.FnTable.GetVideoStreamTextureSize(nDeviceIndex, eFrameType, ref pTextureBounds, ref pnWidth, ref pnHeight);
		}

		// Token: 0x06002E25 RID: 11813 RVA: 0x000F1E38 File Offset: 0x000F0038
		public EVRTrackedCameraError GetVideoStreamTextureD3D11(ulong hTrackedCamera, EVRTrackedCameraFrameType eFrameType, IntPtr pD3D11DeviceOrResource, ref IntPtr ppD3D11ShaderResourceView, ref CameraVideoStreamFrameHeader_t pFrameHeader, uint nFrameHeaderSize)
		{
			return this.FnTable.GetVideoStreamTextureD3D11(hTrackedCamera, eFrameType, pD3D11DeviceOrResource, ref ppD3D11ShaderResourceView, ref pFrameHeader, nFrameHeaderSize);
		}

		// Token: 0x06002E26 RID: 11814 RVA: 0x000F1E60 File Offset: 0x000F0060
		public EVRTrackedCameraError GetVideoStreamTextureGL(ulong hTrackedCamera, EVRTrackedCameraFrameType eFrameType, ref uint pglTextureId, ref CameraVideoStreamFrameHeader_t pFrameHeader, uint nFrameHeaderSize)
		{
			pglTextureId = 0U;
			return this.FnTable.GetVideoStreamTextureGL(hTrackedCamera, eFrameType, ref pglTextureId, ref pFrameHeader, nFrameHeaderSize);
		}

		// Token: 0x06002E27 RID: 11815 RVA: 0x000F1E8C File Offset: 0x000F008C
		public EVRTrackedCameraError ReleaseVideoStreamTextureGL(ulong hTrackedCamera, uint glTextureId)
		{
			return this.FnTable.ReleaseVideoStreamTextureGL(hTrackedCamera, glTextureId);
		}

		// Token: 0x04002ADC RID: 10972
		private IVRTrackedCamera FnTable;
	}
}
